#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
int x=0,b=1,j=0;
const int t=3; // t is the base number
const int m=10; // m is the multiplicative integer
const int q=15; // q is lenght of the sequence
for(int i=0; i<q; i++){
x = b/t+1;
j = 0;
	while(x < b){
		if(x%m == 0){
		j++;
		}
	x++;
	}
printf("%d ",j);
b*=t;
}
getchar();
return 0;
}

